package com.zhl.projectmerger;

import com.github.javaparser.ast.body.ClassOrInterfaceDeclaration;

import java.util.List;

/**
 * 合并策略注册器
 * @author zhangHL
 */
public interface MergerStrategyRegister {
    /**
     * 注册
     * @param strategy
     */
    void regist(MergeStrategy strategy);

    /**
     * 注册
     * @param strategies
     */
    void regist(List<MergeStrategy> strategies);

    /**
     * 删除
     * @param strategy
     */
    void unRegister(MergeStrategy strategy);

    /**
     * 删除
     * @param strategies
     */
    void unRegist(List<MergeStrategy> strategies);

    /**
     * 选择策略
     * @param fromClass
     * @param toClass
     * @param mergerConfig
     * @return
     */
    MergeStrategy selectMergeStrategy(
            ClassOrInterfaceDeclaration fromClass,
            ClassOrInterfaceDeclaration toClass,
            ProjectMergeConfig mergerConfig);

}
